package com.hoshiicloud.payment.param;

import com.alibaba.fastjson.JSON;
import com.hoshiicloud.payment.WeixinPayConfig;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @program: hoshiicloud
 * @description: 微信支付方式配置实体
 * @author: Mr.wu
 * @create: 2019-05-25 09:54
 **/
@ApiModel
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class WeixinUpdateParam extends PaymentUpdateParam {

    private WeixinPayConfig weixinPayConfig;

    /**
     * 将子类属性转为json字符串
     *
     * @return
     */
    public String configToJSONString() {
        return JSON.toJSONString(weixinPayConfig);
    }
}
